#include<bits/stdc++.h>
#define int long long
using namespace std;
inline int read()
{
	int res=0,f=1;char c=getchar();
	while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
	while(c>='0'&&c<='9'){res=(res<<1)+(res<<3)+(c^48);c=getchar();}
	return res*f;
}
void write(int x)
{
	if(x<0)putchar('-'),x=-x;
	if(x>9)write(x/10);
	putchar(x%10+'0');
}
int n,m;
int u[114514],v[114514];
int f[1145];
int chk[1145][1145],dp[1145][1145];
int find(int x){return f[x]==x?x:f[x]=find(f[x]);}
inline void merge(int x,int y)
{
	int fx=find(x),fy=find(y);
	if(fx==fy) return;
	f[fx]=fy;
}
const int mod=998244353;
signed main()
{
	freopen("soft.in","r",stdin);
	freopen("soft.out","w",stdout);
	n=read(),m=read();
	for(int i=1;i<n;i++) 
	{
		u[i]=read(),v[i]=read();
		if(u[i]>v[i]) swap(u[i],v[i]);
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=n;j++) f[j]=j;
		chk[i][i]=1;
		for(int j=i+1;j<=n;j++)
		{
			for(int k=1;k<n;k++) if(v[k]==j&&u[k]>=i&&u[k]<=j) merge(u[k],v[k]);
			int flag=1;
			for(int k=i;k<=j;k++) if(find(k)!=find(i)) flag=0;
			chk[i][j]=flag;
		}
	}
	dp[0][0]=1;
	for(int i=1;i<=n;i++)
		for(int j=1;j<=i;j++)
			for(int k=0;k<i;k++)
				if(chk[k+1][i]) dp[i][j]=(dp[i][j]+dp[k][j-1])%mod;
	for(int i=1;i<=m;i++) write(dp[n][i]),puts("");
	return 0;
}
